<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>扰动机制设置</title>
    <style>
        body {
            font-family: Arial, sans-serif;
            margin: 0;
            padding: 0;
            background-image: url('static/background.png'); /* 替换为你的背景图片路径 */
            background-size: cover;
            background-position: center;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            height: 100vh;
        }
        header {
            width: 100%;
            background-color: rgba(255, 255, 255, 0.8); /* 半透明背景 */
            padding: 10px 0;
            text-align: center;
            position: fixed;
            top: 0;
            left: 0;
            z-index: 1000;
        }
        nav ul {
            list-style-type: none;
            padding: 0;
            display: flex;
            justify-content: center;
        }
        nav ul li {
            margin: 0 15px;
        }
        nav ul li a {
            text-decoration: none;
            color: black;
            font-weight: bold;
        }
        nav ul li a:hover {
            color: rgb(85, 153, 222);
        }
        main {
            max-width: 400px;
            margin: 70px 20px; /* 调整上边距以避免被导航栏遮挡 */
            text-align: center;
            background-color: rgba(255, 255, 255, 0.8); /* 半透明背景 */
            padding: 20px;
            border-radius: 10px;
            box-shadow: 0 0 10px rgba(0, 0, 0, 0.1); /* 添加阴影 */
        }
        main h1 {
            font-size: 1.5em;
        }
        main p {
            line-height: 1.6;
        }
        footer {
            width: 100%;
            background-color: rgba(255, 255, 255, 0.8); /* 半透明背景 */
            padding: 10px 0;
            text-align: center;
            position: fixed;
            bottom: 0;
            left: 0;
            z-index: 1000;
        }
        .button {
            display: block;
            width: 95%;
            padding: 10px;
            margin-top: 10px;
            border: 2px solid #007BFF; /* 蓝色边框 */
            border-radius: 5px;
            text-decoration: none;
            color: white; /* 白色文本 */
            font-weight: bold;
            background-color: #007BFF; /* 蓝色背景 */
            transition: background-color 0.3s, color 0.3s; /* 平滑颜色变化 */
        }
        .button:hover {
            background-color: #0056b3; /* 深蓝色背景 */
            color: #ffffff; /* 白色文本 */
        }
        input[type="text"] {
            width: 100%;
            padding: 10px;
            margin: 10px 0;
            border: 2px solid #007BFF; /* 蓝色边框 */
            border-radius: 5px;
            box-sizing: border-box; /* 确保边框不会使输入框变大 */
        }
    </style>
</head>
<body>
    <header>
        <nav>
            <ul>
                <li><a href="/index">首页</a></li>
                <li><a href="/introduction">系统介绍</a></li>
                <li><a href="/perturbation">参数设置</a></li>
                <li><a href="/generate">流量生成</a></li>
                <li><a href="/detect">检测测试</a></li>
            </ul>
        </nav>
    </header>
    <main>
        <h1>设置参数</h1>
        <form action="/perturbation" method="POST">
            <label for="perturbation_strength">扰动强度 (ξ):</label>
            <input type="number" step="0.01" name="perturbation_strength" id="perturbation_strength" placeholder="0.8" required><br><br>

            <label for="alpha">对抗损失权重 (α):</label>
            <input type="number" step="0.01" name="alpha" id="alpha" placeholder="0.1" required><br><br>

            <label for="beta">生成器学习率 (β):</label>
            <input type="number" step="0.001" name="beta" id="beta" placeholder="0.03" required><br><br>

            <label for="zeta">判别器学习率 (ζ):</label>
            <input type="number" step="0.0001" name="zeta" id="zeta" placeholder="0.002" required><br><br>

            <label for="mu">动量因子 (μ):</label>
            <input type="number" step="0.01" name="mu" id="mu" placeholder="0.6" required><br><br>

            <label for="epsilon">集成模型学习率 (ε):</label>
            <input type="number" step="0.0001" name="epsilon" id="epsilon" placeholder="0.0002" required><br><br>

            <button type="submit">提交</button>
        </form>
<!--        <form>
            <label for="perturbation-strength">扰动强度ξ：</label>
            <input type="text" id="perturbation-strength" name="perturbation-strength" required>

            <a href="/generate" class="button">开始生成恶意流量</a>
        </form>
-->
    </main>
    <footer>
        <p>&copy; 2025 恶意流量生成系统</p>
    </footer>
</body>
</html>